home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / archival / ftp / BFTP.312 / bftp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-06-29  |  3.1 KB  |  125 lines

  1. /************************************************************************
  2.  *                                    *
  3.  *     Background File Transfer Program (BFTP)                *
  4.  *                                    *
  5.  *    Written at USC/Information Sciences Institute            *
  6.  *    September, 1988                            *
  7.  *                                    *
  8.  *    BFTP is Public Domain, and may be used for any purpose as    *
  9.  *    long as this notice is not removed.  USC-ISI does not assume    *
  10.  *    any responsibility for the correctness, performance, or use    *
  11.  *    of this software.                        *
  12.  *                                    *
  13.  ************************************************************************/
  14.  
  15. /*
  16. *    bftp.h
  17. */
  18.  
  19. /* --- Customize these parameters for your site! --- */
  20.  
  21. #ifdef SUNOS4
  22. #define FXPATH "/nfs/u5/deschon/bftp/sunos4/fts"    /* used in bftp & bftptool */
  23. #define BFTPPATH "/nfs/u5/deschon/bftp/sunos4/bftp" /* used in bftpd */
  24. #else
  25. #ifdef BSD4_3
  26. #define FXPATH "/nfs/u5/deschon/bftp/vax/fts"
  27. #define BFTPPATH "/nfs/u5/deschon/bftp/vax/bftp"
  28. #else
  29. #define FXPATH "/nfs/u5/deschon/bftp/sunos3/fts"    /* used in bftp & bftptool */
  30. /* (was /nfs/u3/pd/bin/fts) */
  31. #define BFTPPATH "/nfs/u5/deschon/bftp/sunos3/bftp" /* used in bftpd */
  32. #endif
  33. #endif
  34.  
  35. #define MAILPATH "/usr/ucb/mail"    /* used by fts */
  36. #define SITESTR "isi.edu"        /* default mailbox = login@sitestr */
  37.  
  38. /* ------------------------------------------------- */
  39.  
  40. #define REQPREFIX "bftp"
  41. #define SAVEPREFIX "bftp-save"
  42. #define NULLSTR    ""
  43.  
  44. #define DEFAULT_BYTESZ 8
  45. #define DEFAULT_PORT 21
  46.  
  47. #define boolean int
  48.  
  49. #ifndef FALSE
  50. #define FALSE        0        /* logical false */
  51. #define TRUE        !FALSE        /* logical true */
  52. #endif
  53.  
  54. #define COPY 0        /* transfer mode */
  55. #define MOVE 1
  56. #define DFILE 2
  57. #define VERIFY 3
  58. #define VERIFY_SRC 4
  59.  
  60. #define APPE 0        /* creation mode */
  61. #define STOR 1
  62. #define STOU 2
  63.  
  64. #define DST 0
  65. #define SRC 1
  66.  
  67. #define ASCII 0
  68. #define EBCDIC 1
  69. #define IMAGE 2
  70. #define LOCAL 3
  71. #define NOTYPE 4
  72.  
  73. #define NONPRINT 0
  74. #define TELNET 1
  75. #define CCNTRL 2
  76. #define NOFORM 3
  77.  
  78. #define STREAM 0
  79. #define BLOCK 1
  80. #define COMP 2
  81.     
  82. #define FIL 0
  83. #define RECORD 1
  84. #define PAGE 2
  85.  
  86. #define MAXLEN 100    /* standard string length */
  87. #define MAX_SAVES 50    /* max number of save files shown */
  88.  
  89. struct hostinfo {
  90.     char    host[MAXLEN];    /* Domain name of FTP server host */
  91.     char    user[MAXLEN];    /* User name for login */
  92.     char    passwd[MAXLEN];    /* Password for login */
  93.     char    acct[MAXLEN];    /* Account for login */
  94.     char    dir[MAXLEN];    /* Pathname - directory part */
  95.     char    file[MAXLEN];    /* Pathname - file part */
  96.     short    port;        /* Port number to use */
  97. };
  98.  
  99. struct fileinfo {
  100.     char     filetype[10],    /* Ascii plus form, Ebcdic plus form,
  101.                   (form = Non-print, Telnet, 
  102.                               or Carriage-control)
  103.                   Image, or Local plus Byte-size */
  104.         stru,        /* File, Record, or Page */
  105.         mode;        /* Stream, Block, Compressed */
  106.     int      reqtype,    /* COPY, MOVE, DFILE, VERIFY, NOMODE */
  107.         creation,    /* STOR, STOU, APPE */
  108.         multflag;    
  109. };
  110.  
  111. struct reqinfo {
  112.     char     rpasswd[MAXLEN],
  113.         mailbox[MAXLEN],
  114.         mailfile[MAXLEN],    /* *** MAXPATHLEN ? */
  115.         cmdfile[MAXLEN];     /* *** MAXPATHLEN ? */
  116.     int    interval,
  117.         ntries;
  118. };
  119.  
  120. struct conninfo {
  121.     int   socket ;    /* Socket number */
  122.     FILE *fpin ;         /* File Pointer for input side of Telnet conn*/
  123.     FILE *fpout ;        /* File Pointer for output side */
  124. };
  125.